httpAlbum(handleData);

/* var baseUrl   ="http://192.168.4.18:3000/"
function ajax({
    url,
    method = "get",
    success
}){
   var xhr =  new XMLHttpRequest();
   xhr.open(method,url=baseUrl+url,true);
   xhr.send();
   xhr.onreadystatechange = function(){
       if(xhr.readyState == 4 && xhr.status == 200){
           var result = JSON.parse(xhr.responseText);
           success(result)
       }
   }
}


var listUrl = "http://192.168.4.18:3000/top/album"
                    ajax({url:listUrl,method:"get",success:res=>{
                        // console.log(res)
                        var arr = res.albums;
                        console.log(arr);
                        arr.forEach((item,index)=>{
                            var xu = item.artist.name;
                            
                        var htmlItem = `
                            <a href ="../html/detail.html?id=${item.id}">
                                <div class ="cover"> 
                                <img src ="${item.picUrl}" alt="">
                                    <div class="txt-bottom">
                                        <p class="title">${item.name}</p>
                                        <p class="name">${xu}</p>
                                    </div>
                                </div>
                            
                            </a>
                        
                            `
                            $(".rmtj").append(htmlItem)
                    })
                        
                    }}) */